<template>
  <div class="app-container">
    <!-- 基础信息 -->
    <h5 class="titleInfo">流水单支付信息</h5>
    <el-form ref="forms" class="form" label-width="130px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="流水单号" prop="realName">{{params.orderSn}}</el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="流水单医院" prop="username">{{params.hospitalName}}</el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="消费总金额" prop="username">{{params.orderAmount}}</el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="交易单号" prop="username">{{params.tradeNo}}</el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="支付金额" prop="username">{{params.amount}}</el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="支付方式" prop="username">
            <span v-if="params.payType==1">信用卡快捷支付</span>
            <span v-if="params.payType==2">借记卡快捷支付</span>
            <span v-if="params.payType==3">微信支付</span>
            <span v-if="params.payType==4">支付宝支付</span>
          </el-form-item>
        </el-col>
      </el-row>
      <div class="divBar" />
      <h5 class="titleInfo">分账信息</h5>
      <el-row>
        <el-table :data="tableData" style="width: 100%">
          <el-table-column prop="splitOrderId" label="分账流水号" align="center"></el-table-column>
          <el-table-column prop="userId" label="商户编号" align="center"></el-table-column>
          <el-table-column prop="targetName" label="商户名称" align="center"></el-table-column>
          <el-table-column prop="splitAmount" label="分账金额" align="center"></el-table-column>
        </el-table>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import abnormallist from "@/api/abnormallist/normallist";
export default {
  data() {
    return {
      tableData: [{}],
      params: {}
    };
  },
  mounted() {
    this.detail();
  },
  methods: {
    detail() {
      abnormallist.detail({ id: this.$route.query.orderId }).then(res => {
        console.log(res);
        if (res.data.code == 0) {
          this.params = res.data.data.orderInfo;
          this.tableData = res.data.data.splitList;
        } else {
          this.$message({
            type: "warning",
            message: res.data.msg
          });
        }
      });
    }
  }
};
</script>
<style scoped>
.app-container {
  padding: 0px !important;
}
</style>